import mockjs from 'mockjs';
export default {
  'GET /user/list': mockjs.mock({
    'list|20': [
      {
        'id|+1': 0,
        'userName|1': ['张三', '李四', '王五'],
        'deptName|+1': ['财务一部', '财务二部', '开发一部', '开发二部'],
        email: '@email',
        'phone|1': ['13423232323', '17723432323'],
        'sex|1': ['男', '女'],
        'status|1': ['启用', '禁用'],
        createTime: '@date("yyyy-MM-dd")',
      },
    ],
    page: 1,
    total: 20,
  }),
  'GET /dept/list': mockjs.mock({
    'list|4': [
      {
        'id|+1': 0,
        'label|1': ['开发一部', '开发二部', '财务一部', '财务二部'],
        'value|+1': 0,
      },
    ],
  }),
  'GET /dept/tree': mockjs.mock({
    data: [
      {
        id: '1067246875800000066',
        pid: '0',
        children: [
          {
            id: '1067246875800000064',
            pid: '1067246875800000066',
            children: [
              {
                id: '1067246875800000065',
                pid: '1067246875800000064',
                children: [],
                name: '市场部',
                sort: 0,
                createDate: '2020-07-25 12:48:20',
                parentName: '上海分公司',
              },
              {
                id: '1067246875800000067',
                pid: '1067246875800000064',
                children: [],
                name: '销售部',
                sort: 0,
                createDate: '2020-07-25 12:48:20',
                parentName: '上海分公司',
              },
            ],
            name: '上海分公司',
            sort: 0,
            createDate: '2020-07-25 12:48:20',
            parentName: '人人开源集团',
          },
          {
            id: '1067246875800000063',
            pid: '1067246875800000066',
            children: [
              {
                id: '1067246875800000068',
                pid: '1067246875800000063',
                children: [],
                name: '产品部',
                sort: 1,
                createDate: '2020-07-25 12:48:20',
                parentName: '长沙分公司',
              },
              {
                id: '1067246875800000062',
                pid: '1067246875800000063',
                children: [],
                name: '技术部',
                sort: 2,
                createDate: '2020-07-25 12:48:19',
                parentName: '长沙分公司',
              },
            ],
            name: '长沙分公司',
            sort: 1,
            createDate: '2020-07-25 12:48:19',
            parentName: '人人开源集团',
          },
        ],
        name: '人人开源集团',
        sort: 0,
        createDate: '2020-07-25 12:48:20',
        parentName: null,
      },
    ],
  }),
};
